import API from "../index.js";


// 获取
export function get(){
    return API({
        url: "/admin/category",
        method: "get",
    })
}

//编辑
export function edit(data){
    return API({
        url: "/admin/category",
        method: "put",
        data:data
})}

// 删除
export function del(data){
    return API({
        url: '/admin/category',
        method: "delete",
        data:data
    })
}

//列表
export function list(data){
    return API({
        url:'/admin/category/page',
        method:"get",
        params:data
    })
}

//文章列表
export function regularList(data){
    return API({
        url:'/regular/category',
        method:"get",
    })
}

// 新增
export function add(data){
    return API({
        url: "/admin/category",
        method: "post",
        data:data
    })
}